#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

//1.


double fun(double e)
{
	int i, k;
	double s, t, x;
	s = 0;
	k = 1;
	i = 2;

	x = 3 * 1.0 / 4;

	while (x > e)
	{
		s = s + k * x;
		k = k * (-1);
		t = 2 * i;
		x = (i*2+1)/ (t * t);
		i++;
	}
	return s;
}

int main()
{
	double e = 1e-3;
	printf("\nThe result is %f\n", fun(e));

	return 0;
}


